<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Class old_pointer</title>
<link rel="stylesheet" href="../../../../../../doc/src/boostbook.css" type="text/css">
<meta name="generator" content="DocBook XSL Stylesheets V1.79.1">
<link rel="home" href="../../index.html" title="Chapter 1. Boost.Contract 1.0.0">
<link rel="up" href="../../reference.html#header.boost.contract.old_hpp" title="Header &lt;boost/contract/old.hpp&gt;">
<link rel="prev" href="is_old_value_copyable.html" title="Struct template is_old_value_copyable">
<link rel="next" href="old_ptr.html" title="Class template old_ptr">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table cellpadding="2" width="100%"><tr>
<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../boost.png"></td>
<td align="center"><a href="../../../../../../index.html">Home</a></td>
<td align="center"><a href="../../../../../../libs/libraries.htm">Libraries</a></td>
<td align="center"><a href="http://www.boost.org/users/people.html">People</a></td>
<td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td>
<td align="center"><a href="../../../../../../more/index.htm">More</a></td>
</tr></table>
<hr>
<div class="spirit-nav">
<a accesskey="p" href="is_old_value_copyable.html"><img src="../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../../reference.html#header.boost.contract.old_hpp"><img src="../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="old_ptr.html"><img src="../../../../../../doc/src/images/next.png" alt="Next"></a>
</div>
<div class="refentry">
<a name="boost.contract.old_pointer"></a><div class="titlepage"></div>
<div class="refnamediv">
<h2><span class="refentrytitle">Class old_pointer</span></h2>
<p>boost::contract::old_pointer — Convert old value copies into old value pointers. </p>
</div>
<h2 xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="refsynopsisdiv-title">Synopsis</h2>
<div xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="refsynopsisdiv"><pre class="synopsis"><span class="comment">// In header: &lt;<a class="link" href="../../reference.html#header.boost.contract.old_hpp" title="Header &lt;boost/contract/old.hpp&gt;">boost/contract/old.hpp</a>&gt;

</span>
<span class="keyword">class</span> <a class="link" href="old_pointer.html" title="Class old_pointer">old_pointer</a> <span class="special">{</span>
<span class="keyword">public</span><span class="special">:</span>

  <span class="comment">// <a class="link" href="old_pointer.html#idm45125847996304-bb">public member functions</a></span>
  <span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">typename</span> T<span class="special">&gt;</span> <a class="link" href="old_pointer.html#idm45125847995744-bb"><span class="keyword">operator</span> <span class="identifier">old_ptr_if_copyable</span><span class="special">&lt;</span> <span class="identifier">T</span> <span class="special">&gt;</span></a><span class="special">(</span><span class="special">)</span><span class="special">;</span>
  <span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">typename</span> T<span class="special">&gt;</span> <a class="link" href="old_pointer.html#idm45125847990112-bb"><span class="keyword">operator</span> <span class="identifier">old_ptr</span><span class="special">&lt;</span> <span class="identifier">T</span> <span class="special">&gt;</span></a><span class="special">(</span><span class="special">)</span><span class="special">;</span>
<span class="special">}</span><span class="special">;</span></pre></div>
<div class="refsect1">
<a name="idm45885984593072"></a><h2>Description</h2>
<p>This class is usually only implicitly used by this library and it does not explicitly appear in user code (that is why this class does not have public constructors, etc.). </p>
<div class="refsect2">
<a name="idm45885984592208"></a><h3>
<a name="idm45125847996304-bb"></a><code class="computeroutput">old_pointer</code> public member functions</h3>
<div class="orderedlist"><ol class="orderedlist" type="1">
<li class="listitem">
<pre class="literallayout"><span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">typename</span> T<span class="special">&gt;</span> <a name="idm45125847995744-bb"></a><span class="keyword">operator</span> <span class="identifier">old_ptr_if_copyable</span><span class="special">&lt;</span> <span class="identifier">T</span> <span class="special">&gt;</span><span class="special">(</span><span class="special">)</span><span class="special">;</span></pre>Convert this object to an actual old value pointer for which the old value type <code class="computeroutput">T</code> might or not be copyable. <p>For example, this is implicitly called when assigning or initializing old value pointers of type <code class="computeroutput"><code class="computeroutput"><a class="link" href="old_ptr_if_copyable.html" title="Class template old_ptr_if_copyable">boost::contract::old_ptr_if_copyable</a></code></code>.</p>
<p>
</p>
<div class="variablelist"><table border="0" class="variablelist compact">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody><tr>
<td><p><span class="term">Template Parameters:</span></p></td>
<td><div class="variablelist"><table border="0" class="variablelist compact">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody><tr>
<td><p><span class="term"><code class="computeroutput">T</code></span></p></td>
<td><p>Type of the pointed old value. The old value pointer will always be null if this type is not copyable (see <code class="computeroutput"><code class="computeroutput"><a class="link" href="is_old_value_copyable.html" title="Struct template is_old_value_copyable">boost::contract::is_old_value_copyable</a></code></code>), but this library will not generate a compile-time error. </p></td>
</tr></tbody>
</table></div></td>
</tr></tbody>
</table></div>
</li>
<li class="listitem">
<pre class="literallayout"><span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">typename</span> T<span class="special">&gt;</span> <a name="idm45125847990112-bb"></a><span class="keyword">operator</span> <span class="identifier">old_ptr</span><span class="special">&lt;</span> <span class="identifier">T</span> <span class="special">&gt;</span><span class="special">(</span><span class="special">)</span><span class="special">;</span></pre>Convert this object to an actual old value pointer for which the old value type <code class="computeroutput">T</code> must be copyable. <p>For example, this is implicitly called when assigning or initializing old value pointers of type <code class="computeroutput"><code class="computeroutput"><a class="link" href="old_ptr.html" title="Class template old_ptr">boost::contract::old_ptr</a></code></code>.</p>
<p>
</p>
<div class="variablelist"><table border="0" class="variablelist compact">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody><tr>
<td><p><span class="term">Template Parameters:</span></p></td>
<td><div class="variablelist"><table border="0" class="variablelist compact">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody><tr>
<td><p><span class="term"><code class="computeroutput">T</code></span></p></td>
<td><p>Type of the pointed old value. This type must be copyable (see <code class="computeroutput"><code class="computeroutput"><a class="link" href="is_old_value_copyable.html" title="Struct template is_old_value_copyable">boost::contract::is_old_value_copyable</a></code></code>), otherwise this library will generate a compile-time error when the old value pointer is dereferenced. </p></td>
</tr></tbody>
</table></div></td>
</tr></tbody>
</table></div>
</li>
</ol></div>
</div>
</div>
</div>
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
<td align="left"></td>
<td align="right"><div class="copyright-footer">Copyright © 2008-2019 Lorenzo Caminiti<p>
        Distributed under the Boost Software License, Version 1.0 (see accompanying
        file LICENSE_1_0.txt or a copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)
      </p>
</div></td>
</tr></table>
<hr>
<div class="spirit-nav">
<a accesskey="p" href="is_old_value_copyable.html"><img src="../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../../reference.html#header.boost.contract.old_hpp"><img src="../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="old_ptr.html"><img src="../../../../../../doc/src/images/next.png" alt="Next"></a>
</div>
</body>
</html>
